# -*- coding: utf-8 -*-
"""
Configuration Settings Module

This module provides environment-specific configuration settings.
"""

from .base import BaseSettings
from .development import DevelopmentSettings
from .production import ProductionSettings
from .testing import TestingSettings

import os
from typing import Type


def get_settings() -> BaseSettings:
    """
    Get settings based on environment
    
    Returns:
        Settings instance for the current environment
    """
    env = os.getenv("ENVIRONMENT", "development").lower()
    
    settings_map: dict[str, Type[BaseSettings]] = {
        "development": DevelopmentSettings,
        "production": ProductionSettings,
        "testing": TestingSettings,
        "test": TestingSettings,  # Alias for testing
    }
    
    settings_class = settings_map.get(env, DevelopmentSettings)
    return settings_class()


__all__ = [
    "BaseSettings",
    "DevelopmentSettings", 
    "ProductionSettings",
    "TestingSettings",
    "get_settings",
]

